--- id: Banking - Accounts-spec title: "Ficha técnica" handle: Conta PJ description: "" custom_edit_url: null --- ## Escopos necessários O token para consumir a API Saldo e Extrato deve ser gerado usando o Authorization Code. O escopo `openid`é obrigatório. Ele permite consultar o perfil do usuário BTG com acesso à conta. | Escopo | Descrição | | :------------------------------------------ | :------------------------------------------------------------------------------- | | `empresas.btgpactual.com/accounts.readonly` | Permite consulta de saldo, extrato, dados da conta PJ e recebimento de webhooks. | ## Eventos de webhook Os payloads disponíveis abaixo representam o conteúdo do campo `data`. | Evento | Descrição | | :-------------------- | :------------------------------- | | `transactions.credit` | Crédito em conta(ag. 1 e ag. 50) | | `transactions.debit` | Débito em conta(ag. 1 e ag. 50) | | `balance.avaliable` | Saldo disponível em conta | ### transactions.credit(ag. 50) ```json { "accountId": "25257331000132-208-50-003633854", "date": "2023-04-10T13:47:16.146Z", "creditDebitIndicator": "CREDIT", "amount": 65, "currency": "BRL", "transactionId": "10000000000", "type": "Pix", "reason": "", "relatedParty": { "taxId": "03000000000", "bankCode": "000", "name": "PEDRO ALVARES CABRAL", "currency": "BRL", "branchCode": "1000", "number": "00000000000000000" }, "payload": { "txId": "PIXyz2K7jSRdnDXu9OM09CDdJ", "endToEndId": "E00360305202304101345201fa2cd0f3" }, "description": "Pix recebido de PEDRO ALVARES CABRAL PIXyz2K7jSRdnDXu9OM09CDdJ" } ``` ### transactions.credit (boleto) ```json { "accountId": "25257331000132-208-50-003633854", "date": "2023-04-10T13:47:16.146Z", "creditDebitIndicator": "CREDIT", "amount": 65, "currency": "BRL", "transactionId": "10000000000", "type": "Bankslip", "febrabanCode":"202", "reason": "", "relatedParty": { "taxId": "03000000000", "bankCode": "000", "name": "PEDRO ALVARES CABRAL", "currency": "BRL", "branchCode": "1000", "number": "00000000000000000" }, "payload": { "barcode": "99899993400000990000099999999050039009999990", "ourNumber": "37726891180500390" }, "description":"Boleto pago PEDRO ALVARES CABRAL" } ``` ### transactions.debit(ag. 50) ```json { "accountId": "25257331000132-208-50-003633854", "date": "2023-04-10T13:47:16.146Z", "creditDebitIndicator": "DEBIT", "amount": 65, "currency": "BRL", "transactionId": "10000000000", "type": "Pix", "reason": "", "relatedParty": { "taxId": "03000000000", "bankCode": "000", "name": "PEDRO ALVARES CABRAL", "currency": "BRL", "branchCode": "1000", "number": "00000000000000000" }, "payload": { "txId": "PIXyz2K7jSRdnDXu9OM09CDdJ", "endToEndId": "E00360305202304101345201fa2cd0f3" }, "description": "Pix recebido de PEDRO ALVARES CABRAL PIXyz2K7jSRdnDXu9OM09CDdJ" } ``` ### transactions.credit(ag. 1) ```json { "taxId": "10101111000444", "accountId": "10101111000444-208-1-2232343", "creditDebitIndicator": "CREDIT", "currency": "BRL", "transactionId": "e461e6f1g66443l9991481e93c8k79aa", "date": "2025-11-24T17:51:04.8369995Z", "amount": 768.84, "accountNumber": "2232343", "branch": "1", "description": "PAGAMENTO DE BOLETO", "personType": "PJ", "febrabanCode": "202" } ``` ### transactions.debit(ag. 1) ```json { "taxId": "10101111000444", "accountId": "10101111000444-208-1-2232343", "creditDebitIndicator": "DEBIT", "currency": "BRL", "transactionId": "f431e6f1g64443l9891181e93g8k79ba", "date": "2025-11-22T17:51:04.8369995Z", "amount": 998.84, "accountNumber": "2232343", "branch": "1", "description": "GENERIC-BILLING", "personType": "PJ", "febrabanCode": "202" } ``` ### balance.avaliable ```json {     "accountId": "500000000000-000-00-000000008",     "bankCode": "000",     "taxId": "50000000000000",     "branchCode": "00",     "number": "000000008",     "timestamp": "2023-05-09T14:35:52.630961957Z",     "available": { "amount": 2046 } } ```